﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using ServiceInterfaces.DataContracts;

namespace ServiceInterfaces.ServiceInterfaces
{
    [ServiceContract]
    public interface IFilesLoad
    {
        //[OperationContract]
        //List<TranFileInfo> GetFilesList(); //获得已经上传的文件列表

        /// <summary>
        /// 根据文件路径寻找文件是否存在，返回文件的字节长度
        /// </summary>
        /// <param name="filePath"></param>
        /// <returns></returns>
        [OperationContract]
        TranFileInfo GetFiles(string filePath);

        /// <summary>
        /// 上传文件
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        [OperationContract]
        TranFileInfo UplodaFile(TranFileInfo file); 

        /// <summary>
        /// 根据产品Id修改产品以及照片状态
        /// </summary>
        /// <param name="OrderInfoId"></param>
        /// <returns></returns>
        [OperationContract]
        bool UpdateOrderMoveStatus(int OrderInfoId);

        /// <summary>
        /// 备份照片
        /// </summary>
        /// <param name="srcPath"></param>
        [OperationContract]
        string BuckUpPhoto(string srcPath);

        /// <summary>
        /// 是否存在该crc
        /// </summary>
        /// <param name="RCR"></param>
        /// <returns></returns>
        [OperationContract]
        bool IsExsitCRC(int crc ,out int repeatPhotoId);

        /// <summary>
        /// 添加已开单照片的crc
        /// </summary>
        /// <param name="RCR"></param>
        /// <returns></returns>
        [OperationContract]
        int AddCRC(int crc,int photoId);

        /// <summary>
        /// 删除照片的crc
        /// </summary>
        /// <param name="rcr"></param>
        /// <returns></returns>
        [OperationContract]
        int DeleteCRC(int crc);

    }
}
